package structure

import (
	"gitcode.com/G-YT/iHealth25/server/global"
	"gitcode.com/G-YT/iHealth25/server/model/system"
)

// ServiceStationArticle 服务站文章结构体
type ServiceStationArticle struct {
	global.GVA_MODEL
	ScId           uint            `json:"scId" form:"scId" gorm:"column:sc_id;comment:健管中心ID;size:10;"`                   //健管中心ID
	Title          string          `json:"title" form:"title" gorm:"column:title;comment:标题;size:191;"`                    //标题
	Briefly        string          `json:"briefly" form:"briefly" gorm:"column:briefly;comment:简介;size:191;type:text;"`    //简介
	Cover          string          `json:"cover" form:"cover" gorm:"column:cover;comment:封面;size:191;"`                    //封面
	VideoLink      string          `json:"videoLink" form:"videoLink" gorm:"column:video_link;comment:视频链接;size:191;"`     //视频链接
	Text           string          `json:"text" form:"text" gorm:"column:text;comment:文本;type:text;"`                      //文本
	Details        string          `json:"details" form:"details" gorm:"column:details;comment:详情;type:text;"`             //详情
	Status         int             `json:"status" form:"status" gorm:"column:status;comment:状态 1上架 2下架;"`                  //状态 1上架 2下架
	PraiseNum      *int            `json:"praiseNum" form:"praiseNum" gorm:"column:praise_num;comment:点赞量;"`               //点赞量
	Pv             int             `json:"pv" form:"pv" gorm:"column:pv;comment:浏览量;"`                                     //浏览量
	ForwardNum     *int            `json:"forwardNum" form:"forwardNum" gorm:"column:forward_num;comment:转发量;"`            //转发量
	ReadList       string          `json:"readList" form:"readList" gorm:"column:read_list;comment:阅读名单;type:text;"`       //阅读名单
	ServiceStation *system.SysUser `json:"serviceStation" form:"-" gorm:"->;foreignKey:ScId;references:ID;comment:服务站信息;"` // 服务站信息
}

// TableName 服务站文章 ServiceStationArticle自定义表名 fd_service_station_article
func (ServiceStationArticle) TableName() string {
	return "fd_service_station_article"
}
